from concurrent.futures import ThreadPoolExecutor
import time

def task(name: str) -> str:
    print(f"{name} - step 1\n", end="")
    time.sleep(1)
    print(f"{name} - step 2\n", end="")
    
    return f"{name} complete"


with ThreadPoolExecutor() as executor:
    results = executor.map(task, ["C", "D"])
    for r in results:
        print(r)